package com.moorror.codegenvel.common.table;

import com.intellij.ui.BooleanTableCellRenderer;

import javax.swing.*;
import java.awt.*;

/**
 * @Author jiyanghuang
 * @Date 2025/8/26 22:33
 */
public class MRRenderBooleanTableCellRenderer extends BooleanTableCellRenderer {

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        Object val = value;
        if(value instanceof ColumnDesc){
            ColumnDesc columnDesc = (ColumnDesc)value;
            val = columnDesc.getValueShow();
        }
        return super.getTableCellRendererComponent(table, val, isSelected, hasFocus, row, column);
    }
}
